local jizhi = fk.CreateSkill({
  name = "kl__jizhi",
  tags = { Skill.Compulsory },
})

Fk:loadTranslationTable{
  ["kl__jizhi"] = "集智",
  [":kl__jizhi"] = "锁定技，当你使用锦囊牌时，你摸一张牌，你以此法获得的牌本回合不计入手牌上限。",

  ["@@kl__jizhi-inhand-turn"] = "集智",

  ["$kl__jizhi1"] = "此事以智取胜，可事半功倍。",
}

jizhi:addEffect(fk.CardUsing, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(jizhi.name) and data.card and data.card.type == Card.TypeTrick
  end,
  on_use = function(self, event, target, player, data)
    player:drawCards(1, jizhi.name, nil, "@@kl__jizhi-inhand-turn")
  end,
})

jizhi:addEffect("maxcards", {
  exclude_from = function(self, player, card)
    return card:getMark("@@kl__jizhi-inhand-turn") > 0
  end,
})


return jizhi
